ffc75cd6daf284bac1e9bc03a01391283a506dfa,test-utils/src/main/java/com/google/auto/factory/gentest/EqualityScanner.java,EqualityScanner,visitMethod,#MethodTree#Tree#,319

Before Change


  @Override
  public Void visitMethod(MethodTree reference, Tree tree) {
    MethodTree other = checkTypeAndCast(reference, tree);
    scan(reference.getModifiers(), other.getModifiers());
    testVerb.that(reference.getName()).isEqualTo(other.getName());
    scan(reference.getReturnType(), other.getReturnType());
    parallelScan(reference.getTypeParameters(), other.getTypeParameters());
    parallelScan(reference.getParameters(), other.getParameters());
    parallelScan(reference.getThrows(), other.getThrows());
    scan(reference.getBody(), other.getBody());
    scan(reference.getDefaultValue(), other.getDefaultValue());
    return null;
  }

After Change


  @Override
  public Boolean visitMethod(MethodTree reference, Tree tree) {
    Optional<MethodTree> other = checkTypeAndCast(reference, tree);
    return other.isPresent()
        && scan(reference.getModifiers(), other.get().getModifiers())
        && reference.getName().contentEquals(other.get().getName())
        && scan(reference.getReturnType(), other.get().getReturnType())
        && parallelScan(reference.getTypeParameters(), other.get().getTypeParameters())
        && parallelScan(reference.getParameters(), other.get().getParameters())
        && parallelScan(reference.getThrows(), other.get().getThrows())
        && scan(reference.getBody(), other.get().getBody())
        && scan(reference.getDefaultValue(), other.get().getDefaultValue());

  }